#include <iostream>
using namespace std;
int mypow(int d,int k);
int a[1001];
int main(){
	int n,m;
	while(cin>>n){
		for(int i=1;i<=n;i++) cin>>a[i];
		cin>>m;
		int left,right;
		left=mypow(2,m-1);
		right=mypow(2,m)-1;
		if(left>n) cout<<"EMPTY"<<endl;
		else{
			if(right<=n){
				for(int i=left;i<=right;i++){
					if(i==right) cout<<a[i]<<endl;
					else cout<<a[i]<<" ";
				}
			}
			else{
				for(int i=left;i<=n;i++){
					if(i==n) cout<<a[i]<<endl;
					else cout<<a[i]<<" ";
				}
			}
		}
	}
}

int mypow(int d,int k)
{
	int result=1;
	for(int i=0;i<k;i++) result=result*d;
	return result;
}
